chars = []
with open("p059_cipher.txt","r") as f:
    temp =  f.read()
    chars = temp.split(",")
# print chars

num = []
for c in chars:
    num.append(int(c))
# print num
msg = []
key = []
the = 0
andand = 0
toto = 0

for a in range(97,123):
    for b in range(97,123):
        for c in range(97,123):
            key.append(a)
            key.append(b)
            key.append(c)
            for i in range(len(num)):
                temp = num[i] ^ key[i % 3]
                msg.append(temp)
                if i>=2 :
                    # print chr(msg[i-2]),chr(msg[i-1]),chr(msg[i])
                    the = (chr(msg[i - 2]) == 't' and chr(msg[i - 1]) == 'h' and chr(msg[i]) == 'e') or the
                    andand = (chr(msg[i - 2]) == 'a' and chr(msg[i - 1]) == 'n' and chr(msg[i]) == 'd') or andand
                    toto = ( chr(msg[i - 1]) == 't' and chr(msg[i]) == 'o') or toto
            if the and andand and toto:
                print chr(key[0]),chr(key[1]),chr(key[2]),sum(msg)
                # for ch in msg:
                #     print chr(ch),
            key = []
            msg = []
            the = 0
            andand = 0
            toto = 0
print "ok"